package org.jiaplee.service;

import javax.annotation.Resource;

import org.jiaplee.beans.Image;
import org.jiaplee.dao.ImageDao;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Component("imageService")
public class ImageService {
	private ImageDao imageDao;

	@Resource(name = "imageDao")
	public void setImageDao(ImageDao imageDao) {
		this.imageDao = imageDao;
	}

	@Transactional
	public java.io.Serializable save(Image image) {
		return imageDao.saveImage(image);
	}

	@Transactional(readOnly = true)
	public Image getImage(java.io.Serializable serializable) {
		return imageDao.getImage(serializable);
	}
}
